<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title><%= @page_title ? @page_title + ' @ ' : '' %><%= h AppConfig.app_title %></title>
  <%= javascript_include_tag :defaults %>
  <style type="text/css" media="screen">
    @import '/c/simple.css';
  </style>
</head>

<body>
  <div id="header"><!--O header-->
    <%- unless @logged_user.nil? -%>
      <p class="alignright"><%= _("Hi") %>, <%= link_to(h(@logged_user.name), user_path(@logged_user)) %> - <%= link_to(_('Logout'), logout_session_path) %></p>
    <%- end -%>
    <h1><%= link_to(h(AppConfig.app_title), '/', :title => _("Back to the home")) %></h1>
  </div><!--C header-->
  <%- unless @logged_user.nil? -%>
    <div id="menu"><!--O menu-->
      <ul>
        <li><%= link_to(_("Projects"), projects_path) %></li>
        <%- if @logged_user.is_teacher? -%>
          <li><%= link_to(_("Users"), users_path) %></li>
          <li><%= link_to(_("Your classes"), classes_user_path(@logged_user)) %></li>
        <%- else -%>
          <li><%= link_to(_("Your groups"), groups_user_path(@logged_user)) %></li>
        <%- end -%>
      </ul>
      <div class="clear"></div><!--OC .clear-->
    </div><!--C menu-->
  <%- end -%>
  <%- sidebar = yield(:sidebar) -%>
  <%- unless sidebar.blank? -%>
    <div id="sidebar"><!--O sidebar-->
      <%= sidebar %>
    </div><!--C sidebar-->
  <%- end -%>
  <div id="main"<%= sidebar.blank? ? '' : ' class="leftmargin"' %>><!--O main-->
    <%= render :partial => "shared/notices" %>
    
    <%= yield %>
    <div class="clear"></div><!--OC .clear-->
  </div><!--C main-->
  <div id="footer"><!--O footer-->

  </div><!--C footer-->
  <div id="loader" style="display: none;"><!--O loader-->
    Loading...
  </div><!--C loader-->
</body>
</html>